﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SystemUpdate
{
    public partial class Step2USBFlash : UserControl
    {
        private DownloadFromUSB from = new DownloadFromUSB();

        public Step2USBFlash()
        {
            (Program.mainForm as SystemUpdateForm).downloadFrom = from;
            from.Settings = (Program.mainForm as SystemUpdateForm).Settings;

            InitializeComponent();

            this.textBox1.DataBindings.Add("Text", from.Settings, "SourceFile", true);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();
            //dlg.Filter = "*.nrm";
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                from.Settings.SourceFile = dlg.FileName;
            }
        }
    }
}
